﻿using Data.Tables;
using PayrollExpress.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PayrollExpress.Models
{
    public class UserListModel : BaseModel
    {
        public UserListModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      BaseHelper.Page.Users.ToDescription()
                  )
        { }

        public IEnumerable<SelectListItem> WorkLocations { get; set; }

        public int SelectedWorkLocationID { get; set; }

        public List<UserQuery> ListItems { get; set; }
    }

    public class UserAddEditModel: BaseModel
    {
        public UserAddEditModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Users.ToString(), BaseHelper.Page.Users.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.UserAddEdit.ToDescription()
                  )
        { }

        public User Type { get; set; }

        public IEnumerable<SelectListItem> WorkLocations { get; set; }

        public IEnumerable<SelectListItem> Roles { get; set; }

        public UserAccessModel UserAccess { get; set; }

        public string Password { get; set; }

    }

    public class EmploymentTypeListModel : BaseModel
    {
        public EmploymentTypeListModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      BaseHelper.Page.EmploymentTypes.ToDescription()
                  )
        { }

        public List<EmploymentTypeQuery> ListItems { get; set; }
    }

    public class EmploymentTypeAddEditModel : BaseModel
    {
        public EmploymentTypeAddEditModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.EmploymentTypes.ToString(), BaseHelper.Page.EmploymentTypes.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.EmploymentTypeAddEdit.ToDescription()
                  )
        { }

        public EmploymentType Type { get; set; }
    }

    public class RecurringHolidayListModel : BaseModel
    {
        public RecurringHolidayListModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      BaseHelper.Page.RecurringHolidays.ToDescription()
                  )
        { }

        public IEnumerable<SelectListItem> CalendarMonths { get; set; }

        public IEnumerable<SelectListItem> CalendarDays { get; set; }

        public IEnumerable<SelectListItem> HolidayTpes { get; set; }

        public List<RecurringHolidayQuery> ListItems { get; set; }
    }

    public class RecurringHolidayAddEditModel : BaseModel
    {
        public RecurringHolidayAddEditModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.RecurringHolidays.ToString(), BaseHelper.Page.RecurringHolidays.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.RecurringHolidayAddEdit.ToDescription()
                  )
        { }

        public IEnumerable<SelectListItem> CalendarMonths { get; set; }

        public IEnumerable<SelectListItem> CalendarDays { get; set; }

        public IEnumerable<SelectListItem> HolidayTypes { get; set; }

        public RecurringHoliday Type { get; set; }
    }

    public class WorkLocationListModel : BaseModel
    {
        public WorkLocationListModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      BaseHelper.Page.WorkLocations.ToDescription()
                  )
        { }

        public List<WorkLocationQuery> ListItems { get; set; }
    }

    public class WorkLocationAddEditModel : BaseModel
    {
        public WorkLocationAddEditModel()
            : base(
                      BaseHelper.ControllerName.Administration.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.WorkLocations.ToString(), BaseHelper.Page.WorkLocations.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.WorkLocationAddEdit.ToDescription()
                  )
        { }

        public WorkLocation Type { get; set; }
    }
    
}